Problem: Let $r=3^s-s$ and $s=2^n+1$. What is the value of $r$ when $n=2$?
Explanation: First substitute $n=2$ into the expression for $s$ to find $s=2^2+1=5$.  Then substitute $s=5$ into the expression for $r$ to find $r=3^5-5=243-5=\boxed{238}$.